home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / The World of Computer Software.iso / cmsrc392.zip / COMLIG.MF < prev    next >
Text File  |  1992-03-30  |  2KB  |  60 lines

  1. % This file defines characters common to roman and italic text fonts
  2. % that appear only when |ligs>0|.
  3.  
  4. % Character codes \0042, \0055, \0134, \0173, and \0174 are generated.
  5.  
  6. ligtable "`": "`"=:oct"134";
  7. ligtable "'": "'"=:oct"042", "?" kern 2u#, "!" kern 2u#;
  8.  
  9. ligtable "-": "-"=:oct"173";
  10. ligtable oct"173": "-"=:oct"174";
  11.  
  12. cmchar "Closing quotes";
  13. beginchar(oct"042",7u#+max(2u#,dot_size#),asc_height#,0);
  14. italcorr asc_height#*slant+dot_size#-4.1u#;
  15. adjust_fit(0,0);
  16. x1-.5dot_size=hround .6u; y2+.5dot_size=h;
  17. x2-x1=hround(1.5u+max(2u,dot_size)); y2=y1;
  18. comma(1,a,dot_size,.25u,comma_depth); % left dot and tail
  19. comma(2,b,dot_size,.25u,comma_depth); % right dot and tail
  20. penlabels(1,2); endchar;
  21.  
  22. cmchar "Hyphen";
  23. beginchar("-",6u#,x_height#,0);
  24. italcorr .5x_height#*slant-.5u#;
  25. adjust_fit(0,0);
  26. numeric thickness; thickness=if hefty:bar else:.75[hair,stem] fi;
  27. pickup crisp.nib; pos1(thickness,90); pos2(thickness,90);
  28. top y1r=top y2r=vround(.5h+.5thickness); rt x2=hround(w-u)+eps;
  29. if monospace: x2=w-x1 else: lft x1=hround .2u-eps fi;
  30. filldraw stroke z1e--z2e;  % bar
  31. penlabels(1,2); endchar;
  32.  
  33. cmchar "Opening quotes";
  34. beginchar(oct"134",7u#+max(2u#,dot_size#),asc_height#,0);
  35. italcorr asc_height#*slant-.1u#;
  36. adjust_fit(0,0);
  37. x2+.5dot_size=hround(w-.6u); y1+.5dot_size=h-comma_depth;
  38. x2-x1=hround(1.5u+max(2u,dot_size)); y2=y1;
  39. ammoc(1,a,dot_size,.25u,comma_depth); % left dot and tail
  40. ammoc(2,b,dot_size,.25u,comma_depth); % right dot and tail
  41. penlabels(1,2); endchar;
  42.  
  43. cmchar "En dash";
  44. beginchar(oct"173",9u#,x_height#,0);
  45. italcorr .61803x_height#*slant+.5u#;
  46. adjust_fit(0,0);
  47. pickup crisp.nib; pos1(vair,90); pos2(vair,90);
  48. top y1r=top y2r=vround(.61803h+.5vair); lft x1=-eps; rt x2=w+eps;
  49. filldraw stroke z1e--z2e;  % bar
  50. penlabels(1,2); endchar;
  51.  
  52. cmchar "Em dash";
  53. beginchar(oct"174",18u#,x_height#,0);
  54. italcorr .61803x_height#*slant+.5u#;
  55. adjust_fit(letter_fit#,letter_fit#);
  56. pickup crisp.nib; pos1(vair,90); pos2(vair,90);
  57. top y1r=top y2r=vround(.61803h+.5vair); lft x1=-eps; rt x2=w+eps;
  58. filldraw stroke z1e--z2e;  % bar
  59. penlabels(1,2); endchar;
  60.